$(function(){
   $('#btnSubmit').click(function(){
       var $yourName=$('#yourName');
       var $yourPhone=$('#yourPhone');
       var $yourText=$('#yourText');
        if($yourName.val()==''){
            $yourName.parent().addClass('has-error');
        }else if($yourPhone.val()==''){
            $yourPhone.parent().addClass('has-error');
        }else if($yourText.val()==''){
            $yourText.parent().addClass('has-error');
        }else{
            $('#btnSubmit').submit();
            $yourName.parent().removeClass('has-error').addClass('has-success');
            $yourPhone.parent().removeClass('has-error').addClass('has-success');
            $yourText.parent().removeClass('has-error').addClass('has-success');
        }
   });
});